#include <bits/stdc++.h>
using namespace std;
string add(string &lhs, string &rhs) 
{
    reverse(lhs.begin(), lhs.end());
    reverse(rhs.begin(), rhs.end());
    
    int carry = 0, i = 0, j = 0;
    string ans;
    while(i < lhs.size() || j < rhs.size()) {
        int d = carry;
        if(i < lhs.size()) d +=  lhs[i] - '0', ++i;
        if(j < rhs.size()) d += rhs[j] - '0', ++j;
        carry = d / 10;
        ans.append(1, (d % 10)+'0');
    }    
    // 进位
    while(carry > 0) {
        ans.append(1, (carry % 10)+'0');
        carry /= 10;
    }
    reverse(ans.begin(), ans.end());
    return ans;
}
int main()
{
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    string lhs, rhs;
    cin >> lhs >> rhs;
    cout <<   add(lhs, rhs) << endl;
    return 0;
}